package com.eorchis.module.trainingclass.ui.commond;

import java.util.Date;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.commons.beanutils.BeanUtils;
import org.codehaus.jackson.map.ObjectMapper;

import com.eorchis.core.page.commond.SortInfoBean;
import com.eorchis.core.ui.commond.IQueryCommond;
import com.eorchis.core.ui.commond.impl.BasePageQueryCommond;

/**
 * Title: TrainingClassCommond<br>
 * Description: 培训班信息Commond<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author Max
 * @createDate 2013-12-10
 * @version $Revision$
 */
public class TrainingClassQueryCommond 
			extends BasePageQueryCommond implements IQueryCommond
{
//	setIsAuthorization
	
	private Integer pageo =new Integer(0);
	
	/**
	 * 报名预授权
	 */
	public static Integer IS_AUTHORIZATION_Y=new Integer(1);
	/**
	 * 报名没有预授权
	 */
	public static Integer IS_AUTHORIZATION_N=new Integer(2);
	
	private String[] searchClassIds;	
	private List<String> searchClassIdList;//班级id集合
	private int sendState;//是否发送提醒
	private String []deptIds;//部门id们
	private String deptId;//部门id
	private String parentId;//父级部门
	private String unitLevel;//单位级别
	private String []noDeptID;//过滤部门
	private String searchSponsorName;//主办单位查询
	private String searchSponsorId;//主办单位查询
	private Integer questionnaireMethod;//评估方式
	private Integer searchLockState;//锁定状态（1：锁定（已考核）	2：未锁定（未考核））
	/**
	 * 查询条件：培训班ID
	 */
	private String searchClassId;	
	/**
	 * 查询条件 ：报名状态
	 */
	private Integer searchSignUpState;
	/**
	 * 查询条件:班级名称
	 */
	private String searchClassName;
	
	/**
	 * 查询条件:培训班类型
	 */
	private String searchClassType;
	/**
	 * 查询条件:培训班类别
	 */
	private String searchClassCategory;
	/**
	 * 查询条件:主办单位
	 */
	private String searchOrganizerName;
	
	/**
	 * 查询条件:开班时间
	 */
	private String searchBeginDate;
	
	/**
	 * 查询条件:结班时间
	 */
	private String searchEndDate;
	
	/**
	 * 查询条件:开班状态
	 */
	private Integer searchOpenState;
	
	/**
	 * 查询条件:结班状态
	 */
	private Integer searchEndState;
	
	/**
	 * 查询条件:发布状态
	 */
	private Integer searchPublishState;
	/**
	 * 查询条件:活动状态
	 */
	private Integer searchActiveState;
	
	/**
	 * 查询ids 批量更新用
	 */
	private String[] searchUpdateClassIds;
	
	/**
//	 * 提交类型   启用/作废、发布/未发布、上报
	 */
	private String submintType; 
	
	private String revokeCause;//班级撤销原因
	
	private String searchCourseId;//课程ID
	
	/**
	 * 用户id
	 */
	private String searchUserId;
	
	private Integer searchReportState;//上报状态查询
	private Integer searchAuditState;//项目审核状态查询
	
	/**
	 * 学员审核状态 查询
	 */
	private Integer searchApprovalStatus;
	/**
	 * 报名开班时间
	 */
	private String searchEnterBeginTime;
	/**
	 * 报名截止时间
	 */
	private String searchEnterEndTime;
	/**
	 * 单位id
	 */
	private String searchDepId;
	/**
	 * 单位名称
	 */
	private String searchDepName;
	/**
	 * 报名机构设置  数据字典
	 */
	private String searchDataCode;
	
	/**
	 * 结班时间查询
	 */
	private String searchNowDate;
	
	
	 /**
	 * 查询条件:主办单位id
	 */
	private String searchOrganizerId;
	
	/**
	 * 查询条件:查询类型
	 */
	private String searchType;
	
	private Integer isAuthorization;//报名是否授权 1 授权 2 没授权
	
	
	private String auditReason;//审核意见
	private String auditUserName;//审核人
	private String auditUserId;//审核人Id
	private Integer auditState;//审核状态
	private String treePath;//单位路径
	private String searchTrainingDeptId;//培训机构id查询
	private String searchTrainingNum;//班级编号查询
	private String searchEndTime;
	private String searchEndDateStr;
	private String searchTrainingApplyDeptId;//报名单位id
	private String searchTrainingApplyDeptTreepath;//报名单位Treepath
	private String searchTrainingDeptName;//培训机构名称
	private String searchClassNum;//班级编号
	private Date searchEnterBeginTimeDate;//报名开始时间
	private Date searchEnterEndTimeDate;//报名结束时间
	
	//部委选学报名系统字段
	private String searchMinistrieID;//承办部委id
	private String searchMinistrieName;//承办部委名称
	private Integer isAsignCount;//单位培训班是否根据实际人数显示
	private Integer notClassUserAuditState;//培训班人员审核状态
	
	private String searchQuestionnaireId;//问卷ID
	
	private String searchAssessStartTime;//评估开始时间
	private String searchAssessEndTime;//评估结束时间
	
	private String searchTreeType;//1 承办单位 2 指定报名单位
	private String searchFrameType;
	
	private String searchClassTrainingType;//班级列表类型  2培训班报名 
	
	private String searchRoleCode;
	
	private String searchClassTypeCode;
	private String searchYear;
	private String searchYearByUser;
	
	private Double searchTrainingHourMin;//班级学时
	private Double searchTrainingHourMax;//班级学时
	
	public Integer getPageo() {
		return pageo;
	}
	public void setPageo(Integer pageo) {
		this.pageo = pageo;
	}



	//add by RongSL
	private Integer answerUserStatus;//评估状态
	
	public String getSearchMinistrieID() {
		return searchMinistrieID;
	}
	public void setSearchMinistrieID(String searchMinistrieID) {
		this.searchMinistrieID = searchMinistrieID;
	}
	public String getSearchMinistrieName() {
		return searchMinistrieName;
	}
	public void setSearchMinistrieName(String searchMinistrieName) {
		this.searchMinistrieName = searchMinistrieName;
	}
	public Date getSearchEnterBeginTimeDate() {
		return searchEnterBeginTimeDate;
	}
	public void setSearchEnterBeginTimeDate(Date searchEnterBeginTimeDate) {
		this.searchEnterBeginTimeDate = searchEnterBeginTimeDate;
	}
	public Date getSearchEnterEndTimeDate() {
		return searchEnterEndTimeDate;
	}
	public void setSearchEnterEndTimeDate(Date searchEnterEndTimeDate) {
		this.searchEnterEndTimeDate = searchEnterEndTimeDate;
	}
	public String getSearchClassNum() {
		return searchClassNum;
	}
	public void setSearchClassNum(String searchClassNum) {
		this.searchClassNum = searchClassNum;
	}
	public String getSearchTrainingDeptName() {
		return searchTrainingDeptName;
	}
	public void setSearchTrainingDeptName(String searchTrainingDeptName) {
		this.searchTrainingDeptName = searchTrainingDeptName;
	}
	public String getSearchTrainingApplyDeptTreepath() {
		return searchTrainingApplyDeptTreepath;
	}
	public void setSearchTrainingApplyDeptTreepath(
			String searchTrainingApplyDeptTreepath) {
		this.searchTrainingApplyDeptTreepath = searchTrainingApplyDeptTreepath;
	}
	public String getSearchTrainingApplyDeptId() {
		return searchTrainingApplyDeptId;
	}
	public void setSearchTrainingApplyDeptId(String searchTrainingApplyDeptId) {
		this.searchTrainingApplyDeptId = searchTrainingApplyDeptId;
	}
	public String getSearchEndTime() {
		return searchEndTime;
	}
	public void setSearchEndTime(String searchEndTime) {
		this.searchEndTime = searchEndTime;
	}
	public String getTreePath() {
		return treePath;
	}
	public void setTreePath(String treePath) {
		this.treePath = treePath;
	}
	public String[] getSearchClassIds() {
		return searchClassIds;
	}
	public void setSearchClassIds(String[] searchClassIds) {
		this.searchClassIds = searchClassIds;
	}

	public String getSearchClassId() {
		return searchClassId;
	}
	public void setSearchClassId(String searchClassId) {
		this.searchClassId = searchClassId;
	}
	public String getSearchClassName() {
		return searchClassName;
	}
	public void setSearchClassName(String searchClassName) {
		this.searchClassName = searchClassName;
	}
	public String getSearchClassType() {
		return searchClassType;
	}
	public void setSearchClassType(String searchClassType) {
		this.searchClassType = searchClassType;
	}
	public String getSearchOrganizerName() {
		return searchOrganizerName;
	}
	public void setSearchOrganizerName(String searchOrganizerName) {
		this.searchOrganizerName = searchOrganizerName;
	}
	public String getSearchBeginDate() {
		return searchBeginDate;
	}
	public void setSearchBeginDate(String searchBeginDate) {
		this.searchBeginDate = searchBeginDate;
	}
	public String getSearchEndDate() {
		return searchEndDate;
	}
	public void setSearchEndDate(String searchEndDate) {
		this.searchEndDate = searchEndDate;
	}
	public Integer getSearchOpenState() {
		return searchOpenState;
	}
	public void setSearchOpenState(Integer searchOpenState) {
		this.searchOpenState = searchOpenState;
	}
	public Integer getSearchEndState() {
		return searchEndState;
	}
	public void setSearchEndState(Integer searchEndState) {
		this.searchEndState = searchEndState;
	}
	public Integer getSearchPublishState() {
		return searchPublishState;
	}
	public void setSearchPublishState(Integer searchPublishState) {
		this.searchPublishState = searchPublishState;
	}
	public Integer getSearchActiveState() {
		return searchActiveState;
	}
	public void setSearchActiveState(Integer searchActiveState) {
		this.searchActiveState = searchActiveState;
	}
	public String[] getSearchUpdateClassIds() {
		return searchUpdateClassIds;
	}
	public void setSearchUpdateClassIds(String[] searchUpdateClassIds) {
		this.searchUpdateClassIds = searchUpdateClassIds;
	}
	public String getSubmintType() {
		return submintType;
	}
	public void setSubmintType(String submintType) {
		this.submintType = submintType;
	}
	public String getSearchClassCategory() {
		return searchClassCategory;
	}
	public void setSearchClassCategory(String searchClassCategory) {
		this.searchClassCategory = searchClassCategory;
	}
	public Integer getSearchAuditState() {
		return searchAuditState;
	}
	public void setSearchAuditState(Integer searchAuditState) {
		this.searchAuditState = searchAuditState;
	}
	public Integer getSearchApprovalStatus() {
		return searchApprovalStatus;
	}
	public void setSearchApprovalStatus(Integer searchApprovalStatus) {
		this.searchApprovalStatus = searchApprovalStatus;
	}
	public String getSearchNowDate() {
		return searchNowDate;
	}
	public void setSearchNowDate(String searchNowDate) {
		this.searchNowDate = searchNowDate;
	}
	public String getSearchEnterBeginTime() {
		return searchEnterBeginTime;
	}
	public void setSearchEnterBeginTime(String searchEnterBeginTime) {
		this.searchEnterBeginTime = searchEnterBeginTime;
	}
	public String getSearchEnterEndTime() {
		return searchEnterEndTime;
	}
	public void setSearchEnterEndTime(String searchEnterEndTime) {
		this.searchEnterEndTime = searchEnterEndTime;
	}
	public String getSearchDepId() {
		return searchDepId;
	}
	public void setSearchDepId(String searchDepId) {
		this.searchDepId = searchDepId;
	}
	public String getSearchDataCode() {
		return searchDataCode;
	}
	public void setSearchDataCode(String searchDataCode) {
		this.searchDataCode = searchDataCode;
	}
	public String getSearchOrganizerId() {
		return searchOrganizerId;
	}
	public void setSearchOrganizerId(String searchOrganizerId) {
		this.searchOrganizerId = searchOrganizerId;
	}
	public String getSearchType() {
		return searchType;
	}
	public void setSearchType(String searchType) {
		this.searchType = searchType;
	}
	
	public String getAuditReason() {
		return auditReason;
	}
	public void setAuditReason(String auditReason) {
		this.auditReason = auditReason;
	}
	public String getAuditUserName() {
		return auditUserName;
	}
	public void setAuditUserName(String auditUserName) {
		this.auditUserName = auditUserName;
	}
	public String getAuditUserId() {
		return auditUserId;
	}
	public void setAuditUserId(String auditUserId) {
		this.auditUserId = auditUserId;
	}
	public Integer getAuditState() {
		return auditState;
	}
	public void setAuditState(Integer auditState) {
		this.auditState = auditState;
	}



	public String getSearchDepName() {
		return searchDepName;
	}
	public void setSearchDepName(String searchDepName) {
		this.searchDepName = searchDepName;
	}



	public String getSearchEndDateStr() {
		return searchEndDateStr;
	}
	public void setSearchEndDateStr(String searchEndDateStr) {
		this.searchEndDateStr = searchEndDateStr;
	}



	/**
	 * EXT 页面排序
	 */
	private SortInfoBean sortInfo = null;
	
	/**
	 * 获取排序内容
	 * 
	 * @return
	 * @author HuangS
	 * @date Jul 20, 2012
	 */
	public SortInfoBean getSortInfos() {
		return this.sortInfo;
	}

	public String getSearchTrainingDeptId() {
		return searchTrainingDeptId;
	}
	public void setSearchTrainingDeptId(String searchTrainingDeptId) {
		this.searchTrainingDeptId = searchTrainingDeptId;
	}
	public Integer getSearchReportState() {
		return searchReportState;
	}
	public void setSearchReportState(Integer searchReportState) {
		this.searchReportState = searchReportState;
	}
	public String getSearchTrainingNum() {
		return searchTrainingNum;
	}
	public void setSearchTrainingNum(String searchTrainingNum) {
		this.searchTrainingNum = searchTrainingNum;
	}
	/**
	 * 设置排序内容
	 * 
	 * @param sort
	 * @author HuangS
	 * @date Jul 25, 2012
	 */
	@SuppressWarnings("unchecked")
	public void setSort(String sort) {
		if (sort != null && !"".equals(sort)) {
			sortInfo = new SortInfoBean();
			ObjectMapper objectMapper = new ObjectMapper();
			try {
				List<LinkedHashMap<String, Object>> list = objectMapper.readValue(sort, List.class);
				for (int i = 0; i < list.size(); i++) {
					Map<String, Object> map = list.get(i);
					Set<String> set = map.keySet();
					for (Iterator<String> it = set.iterator(); it.hasNext();) {
						String key = it.next();
						BeanUtils.setProperty(sortInfo, key, map.get(key));
					}
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}
	public Integer getSearchSignUpState() {
		return searchSignUpState;
	}
	public void setSearchSignUpState(Integer searchSignUpState) {
		this.searchSignUpState = searchSignUpState;
	}
	public String getSearchUserId() {
		return searchUserId;
	}
	public void setSearchUserId(String searchUserId) {
		this.searchUserId = searchUserId;
	}
	public Integer getIsAuthorization() {
		return isAuthorization;
	}
	public void setIsAuthorization(Integer isAuthorization) {
		this.isAuthorization = isAuthorization;
	}
	public List<String> getSearchClassIdList() {
		return searchClassIdList;
	}
	public void setSearchClassIdList(List<String> searchClassIdList) {
		this.searchClassIdList = searchClassIdList;
	}
	public Integer getIsAsignCount() {
		return isAsignCount;
	}
	public void setIsAsignCount(Integer isAsignCount) {
		this.isAsignCount = isAsignCount;
	}
	public Integer getNotClassUserAuditState() {
		return notClassUserAuditState;
	}
	public void setNotClassUserAuditState(Integer notClassUserAuditState) {
		this.notClassUserAuditState = notClassUserAuditState;
	}
	public Integer getAnswerUserStatus() {
		return answerUserStatus;
	}
	public void setAnswerUserStatus(Integer answerUserStatus) {
		this.answerUserStatus = answerUserStatus;
	}
	public String getSearchQuestionnaireId() {
		return searchQuestionnaireId;
	}
	public void setSearchQuestionnaireId(String searchQuestionnaireId) {
		this.searchQuestionnaireId = searchQuestionnaireId;
	}
	public String getSearchAssessStartTime() {
		return searchAssessStartTime;
	}
	public void setSearchAssessStartTime(String searchAssessStartTime) {
		this.searchAssessStartTime = searchAssessStartTime;
	}
	public String getSearchAssessEndTime() {
		return searchAssessEndTime;
	}
	public void setSearchAssessEndTime(String searchAssessEndTime) {
		this.searchAssessEndTime = searchAssessEndTime;
	}
	public String getRevokeCause() {
		return revokeCause;
	}
	public void setRevokeCause(String revokeCause) {
		this.revokeCause = revokeCause;
	}
	public int getSendState() {
		return sendState;
	}
	public void setSendState(int sendState) {
		this.sendState = sendState;
	}
	public String getSearchCourseId() {
		return searchCourseId;
	}
	public void setSearchCourseId(String searchCourseId) {
		this.searchCourseId = searchCourseId;
	}
	public String getUnitLevel() {
		return unitLevel;
	}
	public void setUnitLevel(String unitLevel) {
		this.unitLevel = unitLevel;
	}
	public String [] getDeptIds() {
		return deptIds;
	}
	public void setDeptIds(String [] deptIds) {
		this.deptIds = deptIds;
	}
	public String getParentId() {
		return parentId;
	}
	public void setParentId(String parentId) {
		this.parentId = parentId;
	}
	public String getDeptId() {
		return deptId;
	}
	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}
	public String [] getNoDeptID() {
		return noDeptID;
	}
	public void setNoDeptID(String [] noDeptID) {
		this.noDeptID = noDeptID;
	}
	public String getSearchSponsorName() {
		return searchSponsorName;
	}
	public void setSearchSponsorName(String searchSponsorName) {
		this.searchSponsorName = searchSponsorName;
	}
	public String getSearchSponsorId() {
		return searchSponsorId;
	}
	public void setSearchSponsorId(String searchSponsorId) {
		this.searchSponsorId = searchSponsorId;
	}
	public String getSearchTreeType() {
		return searchTreeType;
	}
	public void setSearchTreeType(String searchTreeType) {
		this.searchTreeType = searchTreeType;
	}
	public String getSearchFrameType() {
		return searchFrameType;
	}
	public void setSearchFrameType(String searchFrameType) {
		this.searchFrameType = searchFrameType;
	}
	public String getSearchClassTrainingType() {
		return searchClassTrainingType;
	}
	public void setSearchClassTrainingType(String searchClassTrainingType) {
		this.searchClassTrainingType = searchClassTrainingType;
	}
	public String getSearchRoleCode() {
		return searchRoleCode;
	}
	public void setSearchRoleCode(String searchRoleCode) {
		this.searchRoleCode = searchRoleCode;
	}
	public Integer getQuestionnaireMethod() {
		return questionnaireMethod;
	}
	public void setQuestionnaireMethod(Integer questionnaireMethod) {
		this.questionnaireMethod = questionnaireMethod;
	}
	public Integer getSearchLockState() {
		return searchLockState;
	}
	public void setSearchLockState(Integer searchLockState) {
		this.searchLockState = searchLockState;
	}
	public String getSearchClassTypeCode() {
		return searchClassTypeCode;
	}
	public void setSearchClassTypeCode(String searchClassTypeCode) {
		this.searchClassTypeCode = searchClassTypeCode;
	}
	public String getSearchYear() {
		return searchYear;
	}
	public void setSearchYear(String searchYear) {
		this.searchYear = searchYear;
	}
	public String getSearchYearByUser() {
		return searchYearByUser;
	}
	public void setSearchYearByUser(String searchYearByUser) {
		this.searchYearByUser = searchYearByUser;
	}
	public Double getSearchTrainingHourMin() {
		return searchTrainingHourMin;
	}
	public void setSearchTrainingHourMin(Double searchTrainingHourMin) {
		this.searchTrainingHourMin = searchTrainingHourMin;
	}
	public Double getSearchTrainingHourMax() {
		return searchTrainingHourMax;
	}
	public void setSearchTrainingHourMax(Double searchTrainingHourMax) {
		this.searchTrainingHourMax = searchTrainingHourMax;
	}
	
}
